package view;


import java.awt.GridLayout;

import javax.swing.JPanel;

import model.Day;
import model.TimeSlot;

/**
 * This Class will be the Panel in charge of 
 * organizing and displaying the cellsheet gui
 * of this scheduler that is in charge of viewing
 * the entire schedule as well as, in the case of 
 * scheduler users, editing said schedule. 
 * 
 * @author Tristan D. Boucher
 * @version Commit #10 8/31/2013
 *
 */
@SuppressWarnings("serial")
public class GUISchedulePanel extends AbstractView
{
  /**
   * Constant for Font point of the panels.
   */
  private static final int FONT_SIZE = 16;

  /**
   * Constant for Font for the text fields.
   */
  private static final int FIELD_FONT_SIZE = 12;

  /**
   * Width of this panel.
   */
  private static final int WIDTH = 1000;

  /**
   * Height of this panel.
   */
  private static final int HEIGHT = 600;

  /**
   * Constructor creates and populates the spreadsheet-like 
   * panel with JComboBoxes.
   * 
   * @param the_controller The controller object that this view
   * panel reports to.
   */
  public GUISchedulePanel(final GUIController the_controller)
  {
    super(the_controller, WIDTH, HEIGHT);

    addLinedBorder(addBackground(this, BACKGROUND_COLOR), LINED_BORDER_COLOR);

  }

  private JPanel buildCellPanel()
  {
    final int days_length = Day.getDays().length;
    final int times_length = TimeSlot.getAllSlots().length;
    final JPanel cell_panel = new JPanel();

    addLinedBorder(addBackground(cell_panel, BACKGROUND_COLOR), LINED_BORDER_COLOR).
    setLayout(new GridLayout(TimeSlot.getAllSlots().length + 1, 
                             Day.getDays().length + 1));


    cell_panel.add(addBackground(new JPanel(), BACKGROUND_COLOR));

    for (int i = 0; i < days_length; i++)
    {
      cell_panel.add(addBackground(new AvailabilityCell(Day.getDays()[i].toString(),
                                                        my_width,
                                                        my_height), 
                                                        BACKGROUND_COLOR));
    }

    for (int i = 0; i < days_length; i++)
    {

    }

    return cell_panel;
  }

  private JPanel buildNameListPanel()
  {
    final JPanel name_list_panel = new JPanel();

    return name_list_panel;
  }

  private JPanel buildSearchUserAvailabilityPanel()
  {
    final JPanel search_panel = new JPanel();

    return search_panel;
  }

  private JPanel buildHourlyCoveragePanel()
  {
    final JPanel coverage_panel = new JPanel();

    return coverage_panel;

  }


}
